package com.zpark.pojo;


import javax.validation.constraints.NotBlank;

/**
 *
 * @author Alan - liu
 * @date 2021/04/09 16:51
 **/
public class Users {
    @NotBlank(message="用户名不能为空")   //非空校验
    private  String name ;
    @NotBlank(message="密码不能为空")   //非空校验
    private  String password;
    private   Integer age;

    public Users(String name, String password, Integer age) {
        this.name = name;
        this.password = password;
        this.age = age;
    }

    public Users(String name) {
        this.name = name;
    }

    public Users() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "Users{" +
                "name='" + name + '\'' +
                ", password='" + password + '\'' +
                ", age=" + age +
                '}';
    }
}
